<!DOCTYPE html>
<html lang="zh-CN">
 <head> 
  <meta charset="utf-8" /> 
  <meta http-equiv="X-UA-Compatible" content="IE=edge" /> 
  <!-- 上述3个meta标签*必须*放在最前面，任何其他内容都*必须*跟随其后！ --> 
  <meta name="description" content="" /> 
  <meta name="author" content="" /> 
  <link rel="icon" href="./img/asset-favicon.ico" /> 
  <title>社交-吐槽</title> 
  <!-- 页面 css js --> 
  <!-- <script type="text/javascript" src="../../plugins/sui/sui.min.js"></script> --> 
  <!-- <script type="text/javascript" src="../../plugins/bootstrap/dist/js/bootstrap.js"></script> --> 
  <link rel="stylesheet" type="text/css" href="./plugins/normalize-css/normalize.css" /> 
  <link rel="stylesheet" type="text/css" href="./plugins/yui/cssgrids-min.css" /> 
  <link rel="stylesheet" type="text/css" href="./plugins/sui/sui.min.css" /> 
  <link rel="stylesheet" type="text/css" href="./plugins/sui/sui-append.min.css" /> 
  <link rel="stylesheet" type="text/css" href="./plugins/font-awesome/css/font-awesome.min.css" /> 
  <link rel="stylesheet" type="text/css" href="./css/widget-base.css" /> 
  <link rel="stylesheet" type="text/css" href="./css/widget-head-foot.css" /> 
  <link rel="stylesheet" type="text/css" href="./plugins/bootstrap/dist/css/bootstrap.min.css" /> 
  <link rel="stylesheet" type="text/css" href="./css/page-sj-spit-detail.css" />
  <script type="text/javascript" src="js/host.js"></script>
  <script type="text/javascript" src="js/vue-2.5.16.js"></script>
  <script type="text/javascript" src="js/axios-0.18.0.min.js"></script>
  <script type="text/javascript" src="http://api.mlh.site:8000/static/ckeditor/ckeditor/ckeditor.js"></script>
 </head> 
 <body>
 <div id="app">

  <div class="wrapper"> 
   <!--引用组件--> 
   <!--头部导航--> 
   <header> 
    <div class="sui-navbar"> 
     <div class="navbar-inner"> 
      <a href="index-logined.html" class="sui-brand"><img src="./img/asset-logo-black.png" alt="社交" /></a> 
      <ul class="sui-nav"> 
       <li class="active"><a href="./headline-logined.html">头条</a></li> 
       <li><a href="./qa-logined.html">问答</a></li> 
       <li><a href="./activity-index.html">活动</a></li> 
       <li><a href="./makeFriends-index.html">交友</a></li> 
       <li><a href="./spit-index.html">吐槽</a></li> 
       <li><a href="./recruit-index.html">招聘</a></li> 
      </ul> 
      <form class="sui-form sui-form pull-left"> 
       <input type="text" placeholder="输入关键词..." /> 
       <span class="btn-search fa fa-search"></span> 
      </form> 
      <div class="sui-nav pull-right info"> 
       <li><a href="./other-notice.html" target="_blank" class="notice">通知</a></li> 
       <li class="hover"> <span class="fa fa-plus "></span> 
        <ul class="hoverinfo"> 
         <li><i class="fa fa-share-alt" aria-hidden="true"></i> <a href="./headline-submit.html">去分享</a></li> 
         <li><i class="fa fa-question-circle" aria-hidden="true"></i> <a href="./qa-submit.html" target="_blank">提问题</a></li> 
         <li><i class="fa fa-comments" aria-hidden="true"></i><a href="./spit-submit.html" target="_blank">去吐槽</a></li> 
         <li><i class="fa fa-heartbeat" aria-hidden="true"></i> <a href="./makeFriends-submit.html" target="_blank">发约会</a></li> 
        </ul> </li> 
       <li v-if="username">
           <div>
               <a href="./person-homepage.html" target="_blank" class="homego" style="margin-right: 10px">
               <img v-if="avatar_url" :src="avatar_url" alt="用户头像" style="width: 39px;height: 39px;"/>
               <img v-else src="./img/widget-photo.png" alt="用户头像" />
           </a>
           <a href="#" class="homego" @click="logout" style="font-size: 15px;">退出</a>
           </div>

       </li>
       <li v-else>
           <a href="./person-loginsign.html" class="homego" style="font-size: 15px;">登录/注册</a>
       </li>
      </div> 
     </div> 
    </div> 
   </header> 
   <!--引用组件--> 
   <!--两列布局--> 
   <div class="wrapper tc-detail"> 
    <div class="fl left-list"> 
     <div class="tc-detail"> 
      <!-- 标题区 --> 
      <div class="detail-tit"> 
       <div class="detail-author"> 
        <a href="javascript:;">[[auth_name]]</a> 发布
       </div> 
       <div class="detail-content"> 
        <p v-html="spit.content">[[spit.content]]</p>

          <div id="spitImageBox">
            <img  v-for="image in spit.images" :src="image.image" alt="" style="width: 166px;height: 122px;" id="spitImage"/>
          </div>


       </div> 
       <div class="detail-tool"> 
        <ul> 
         <li><span class="star"><i :class="[spit.spit_follow?'fa fa-thumbs-up':'fa fa-thumbs-o-up' ]" aria-hidden="true" @click="spit_follow()">[[spit.follow_count]]</i></span></li>
         <li><a href="#" data-toggle="modal" data-target="#shareModal"><i class="fa fa-share-alt" aria-hidden="true"></i> [[spit.share_count]]</a></li>
         <li><a data-toggle="modal" data-target="#remarkModal" @click="show_edit_comment"><i class="fa fa-commenting" aria-hidden="true"></i> [[spit.comment_count]]</a></li>
        </ul>
           <div v-show="edit_comment_flag">
               <h4>发布评论</h4><br>
               <form @submit.prevent="create_comments">
                 <div class="editor">
                    <textarea name="edit_comment"></textarea>
                 <div class="btns" style="float: right">
                  <!--<button class="sui-btn btn-danger btn-release">发布</button> -->
                     <input type="submit" name="" value="发布" class="sui-btn btn-danger btn-release">
                 </div>
                 <div class="clearfix"></div>
                </div>

               </form>
           </div>
       </div>
      </div> 
      <!-- 评论区 --> 
      <div class="comment-area"> 
       <div class="comment-tit"> 
        <span>评论</span> 
       </div> 

      <ul class="comment-list">
        <li v-for="comment in comments">
         <div class="item-photo">
             <div style="width: 39px;height: 39px;">
                <img v-if="comment.user && comment.user.avatar_url" :src="comment.user.avatar_url" alt="" />
                <img v-else src="./img/widget-widget-photo.png" alt="" />
             </div>

         </div>
         <div class="item-content">
          <p class="author" v-if="comment.user"><a href="javascript:;">[[comment.user.nick_name]]</a> 发布</p>
          <p class="author" v-else><a href="javascript:;">[[comment.username]]</a> 发布</p>
          <p class="content" v-html="comment.content">[[comment.content]]</p>
             <div class="fr1">
                 <a href="javascript:;" class="comment_reply">回复</a>
             </div>
             <div class="fr1" style="margin-left: 20px;">
                 <span class="star"><i :class="[comment.comment_follow?'fa fa-thumbs-up':'fa fa-thumbs-o-up' ]" aria-hidden="true" @click="commnet_follow(comment.id,comment.comment_follow)"></i>[[comment.count]]</span>
             </div>

             <form class="reply_form fl" @submit.prevent="create_subs_comments(comment.id)" >
                 <div>
                     <textarea  class="reply_input" v-model="introduct"></textarea>

                 </div>
                 <br>
                 <div>
                    <input type="submit" name="" value="回复" class="reply_sub " style="margin-right: 20px">
                 </div>

            </form>

         </div>

        <div v-if="comment.parent" >
            <div >
                 <div class="item-content" style="margin-left: 90px;margin-top:20px;background-color:whitesmoke;">
                  <p class="author" v-if="comment.parent.user"> <a href="javascript:;">// [[comment.parent.user.nick_name]] : </a></p>
                  <p class="author" v-else><a href="javascript:;">[[comment.parent.username]]</a> 发布</p>
                  <p class="content" v-html="comment.parent.content">[[comment.parent.content]]</p>
                 </div>
            </div>
        </div>

        </li>



       </ul>

         <div class="pagenation">
            <a v-show="previous" @click="on_page(previous)">上一页</a>
            <a v-for="num in page_nums" v-show="total_page>1" @click="on_page(num)" :class="num==page?'active':''">[[num]]</a>
            <a v-show="next" @click="on_page(next)">下一页></a>
        </div>


      </div> 
     </div> 
    </div> 
    <div class="fl right-tag"> 
     <div class="block-btn"> 
      <p>来个匿名吐槽，发泄一下你心中的怒火吧！</p> 
      <a class="sui-btn btn-block btn-share" href="./spit-submit.html" target="_blank">发吐槽</a> 
     </div> 
    </div> 
    <div class="clearfix"></div> 
   </div> 
  </div> 
 </div>
<script type="text/javascript" src="http://v2.uyan.cc/code/uyan.js"></script>
<script type="text/javascript" charset="utf-8" src="http://v3.jiathis.com/code/jia.js"></script>

<script type="text/javascript" src="js/spit-detail.js"></script>
<script type="text/javascript" src="js/jquery-1.12.4.min.js"></script>
<script type="text/javascript">

   $(function(){
      // 给未来元素绑定事件,使用事件委托的方式
      $(document).delegate('.comment_reply', 'click', function() {
          if($(this).parents().next().next().css('display')=='none'){
              // 从未来事件开始定位到需要作用的其他未来标签上
              $(this).parents().next().next().css({display:'block'});


          }else if($(this).parents().next().next().css('display')=='block'){
              $(this).parents().next().next().css({display:'none'});
          }

      });
  });
</script>
 </body>
</html>